package edu.its.dreamteam.daf.beans;

import java.io.Serializable;

public class Player extends BaseBean implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String idPlayer;
	private String firstName;
	private String midName;
	private String lastName;	
	private String idPosition;
	private String idClub;
	private Integer defaultPrice;
	private String number;
	
	private Position position;
	private Club club;
	
	public String getIdPlayer() {
		return idPlayer;
	}
	public void setIdPlayer(String idPlayer) {
		this.idPlayer = idPlayer;
	}
	
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getMidName() {
		return midName;
	}
	public void setMidName(String midName) {
		this.midName = midName;
	}


	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getIdPosition() {
		idPosition = getPosition().getIdPosition();
		return idPosition;
	}
	public void setIdPosition(String idPosition) {
		this.idPosition = idPosition;
		getPosition().setIdPosition(idPosition);
	}

	public String getIdClub() {
		idClub = getClub().getIdClub();
		return idClub;
	}
	public void setIdClub(String idClub) {
		this.idClub = idClub;
		getClub().setIdClub(idClub);
	}

	public Integer getDefaultPrice() {
		return defaultPrice;
	}

	public void setDefaultPrice(Integer defaultPrice) {
		this.defaultPrice = defaultPrice;
	}

	public String getNumber() {
		return number;
	}
	public void setNumber(String number) {
		this.number = number;
	}

	public Position getPosition() {
		if(position==null){
			position = new Position();
		}
		return position;
	}

	public void setPosition(Position position) {
		this.position = position;
	}
	public Club getClub() {
		if(club == null){
			club = new Club();
		}
		return club;
	}
	public void setClub(Club club) {
		this.club = club;
	}
	
	@Override
	protected String getPrimaryKey() {
		return getIdPlayer();
	}
	
	
}
